package com.dk.controller;


import com.dk.entity.Value;
import com.dk.entity.XYOrderVO;
import com.dk.service.IFactOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2021-11-11
 */
@Controller
@RequestMapping("factOrderController")
public class FactOrderController {
    @Autowired
    private IFactOrderService iFactOrderService;

    @RequestMapping("toTest")
    public String toTest(){
        return "test";
    }

    @RequestMapping("getValue")
    @ResponseBody
    public Value getValue(){
        String[] xAxis = {"衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"};
        String[] yAxis = {"5","9","8","11","5","6"};
        String[] yAxis2 = {"2","4","7","5","12","8"};
        Value value = new Value();
        value.setxAxis(xAxis);
        value.setyAxis(yAxis);
        value.setyAxis2(yAxis2);
        return value;

    }

    @RequestMapping("getOrder")
    @ResponseBody
    public XYOrderVO getOrder(){
        XYOrderVO xyOrder = iFactOrderService.getOrder();
        return xyOrder;
    }

}
